import { config, request } from 'utils'

const { api } = config
const { operator, user } = api


export function query(params) {
  return request({
    url: operator,
    method: 'get',
    data: params,
  })
}

export function operatorStat(params) {
  return request({
    url: operator + '/stat',
    method: 'get',
    data: params,
  })
}

export function findByWxId(params) {
  return request({
    url: operator + '/findByWxId',
    method: 'get',
    data: params,
  })
}

export function queryPassword(params) {
  return request({
    url: `${user}/checkPassword?password=${params.password}&wxId=${params.wxId}`,
    method: 'post',
    // data: params
  })
}



export function remove(params) {
  return request({
    url: operator + '/delete',
    method: 'post',
    data: params,
  })
}

export function create(params) {
  return request({
    url: operator,
    method: 'post',
    data: params,
  })
}

export function update(params) {
  return request({
    url: operator,
    method: 'put',
    data: params,
  })
}
